package proxy;

import xml改纯注解.service.UserService;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;


public class UserServiceProxy implements UserService {
  private UserService userService;

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @Override
    public void add() {
    log("add()");
    }

    @Override
    public void delete() {
        log("delete()");

    }

    @Override
    public void update() {
        log("update()");

    }

    @Override
    public void query() {
        log("query()");

    }
    public  void log(String methodName){
        Date currentDate = new Date();
        DateFormat dateFormat =new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        System.out.println("["+dateFormat.format(currentDate)+"]调用了核心业务逻辑方法"+methodName);
     }
}
